import axios from '@/util/request'

export default {
    // 3. 条件查询带分页
    search(page,pageSize,data){
        return axios.request({
            url: axios.useRoute+`/user/conditionFindByPage?page=${page}&pageSize=${pageSize}`,
            method: 'post',
            data
        })
    },
    // 4. 保存学生
    save(data){
        return axios.request({
            url: axios.useRoute+'/user/addUser',
            method: 'post',
            data
        })
    },
    update(data){
        return axios.request({
            url: axios.useRoute+'/user/updateUser',
            method: 'post',
            data
        })
    },
    deleteByIds(data){
        return axios.request({
            url: axios.useRoute+`/user/batchDeleteUser`,
            method: 'post',
            data
        })
    },
    findById(id){
        return axios.request({
            url: axios.useRoute+`/user/getUser/?id=${id}`,
            method: 'get',
        })
    },
}
